package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the nivelescarrera database table.
 * 
 */
@Embeddable
public class NivelesCarreraPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private int carreraId;
	private int nivelesCarreraId;

    public NivelesCarreraPK() {
    }

	@Column(unique=true, nullable=false)
	public int getCarreraId() {
		return this.carreraId;
	}
	public void setCarreraId(int carreraId) {
		this.carreraId = carreraId;
	}

	@Column(unique=true, nullable=false)
	public int getNivelesCarreraId() {
		return this.nivelesCarreraId;
	}
	public void setNivelesCarreraId(int nivelesCarreraId) {
		this.nivelesCarreraId = nivelesCarreraId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof NivelesCarreraPK)) {
			return false;
		}
		NivelesCarreraPK castOther = (NivelesCarreraPK)other;
		return 
			(this.carreraId == castOther.carreraId)
			&& (this.nivelesCarreraId == castOther.nivelesCarreraId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.carreraId;
		hash = hash * prime + this.nivelesCarreraId;
		
		return hash;
    }
}